A possible fix for bug #14333 with hanging at exit on MS-Windows.
authorEli Zaretskii <eliz@gnu.org>
Thu, 29 Aug 2013 15:32:04 +0000 (18:32 +0300)
committerEli Zaretskii <eliz@gnu.org>
Thu, 29 Aug 2013 15:32:04 +0000 (18:32 +0300)
commit0a010f81b8a53e9f6d2bf47005909725e7500508
tree4d3e44aaa25979528f5e358ee38b5bffe443bc0b
parent30b0ab66f41d7860bfaa21668f0502593c57ebe9
A possible fix for bug #14333 with hanging at exit on MS-Windows.

 src/w32.c (term_winsock): Call release_listen_threads before calling
 WSACleanup.
 (_sys_wait_accept): Wait for accept event in a loop with a finite
 timeout, instead of waiting indefinitely.  Will hopefully avoid
 hanging during exit because WSACleanup deadlocks waiting for the
 event object to be released.
 src/w32proc.c (release_listen_threads): New function, signals all
 the reader threads that listen for connections to stop waiting.
 src/w32.h (release_listen_threads): Add prototype.
src/ChangeLog
src/w32.c
src/w32.h
src/w32proc.c